package com.orion.config;

import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Administrator
 * @date 2021/8/26
 */
//@Configuration
public class DoubleLoginMvcViewConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/myLogin").setViewName("customLogin");
        registry.addViewController("/index").setViewName("index");

        registry.addViewController("/doubleLogin/user/login").setViewName("doubleLogin/user/loginPage");
        registry.addViewController("/doubleLogin/admin/login").setViewName("doubleLogin/admin/loginPage");

        registry.addViewController("/doubleLogin/user/index").setViewName("doubleLogin/user/indexPage");
        registry.addViewController("/doubleLogin/admin/index").setViewName("doubleLogin/admin/indexPage");
    }
}
